package com.webchat.rmi.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;

@Configuration
public class WebClientConfig {

    private static final String GATEWAY_HOST = "http://localhost:80";

    @Bean(name = "aigcWebClient")
    public WebClient aigcWebClient(WebClient.Builder webClientBuilder) {
        return webClientBuilder
                .baseUrl(GATEWAY_HOST)
                .build();
    }

    @Bean(name = "ugcWebClient")
    public WebClient ugcWebClient(WebClient.Builder webClientBuilder) {
        return webClientBuilder
                .baseUrl(GATEWAY_HOST)
                .build();
    }
}
